﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.Practices.Unity;

namespace ERPStore.Web.Start
{
	public class MetadataConfig
	{
		public static void Configure(Microsoft.Practices.Unity.IUnityContainer container)
		{
			var modelmetadataService = container.Resolve<Services.IModelMetadataRegistrationService>();
			var metaDataProvider = new ModelMetadata.ModelMetadataProvider(modelmetadataService.List);
			container.RegisterInstance<System.Web.Mvc.ModelMetadataProvider>(metaDataProvider);

			GlobalConfiguration.Configuration.Logger.Info("metadata provider configured");
		}

	}
}
